#include <stdio.h>
#include <stddef.h>
struct S
{
	char c1;
	int i;
	char c2;
};
#define OFFSETOF(type,m_name)      (size_t)&(((struct S*)0)->m_name)

int main()
{
	 struct S s = { 0 };
	printf("%d\n", OFFSETOF(struct S, c1));
	printf("%d\n", OFFSETOF(struct S, i));
	printf("%d\n", OFFSETOF(struct S, c2));

	return 0;
}